package datatypes.film;

import java.util.ArrayList;
import java.util.List;

public class filmWriters {
	List<filmWriter> film_writers;

	public filmWriters() {
		this.film_writers = new ArrayList<filmWriter>();
	}

	public filmWriters(filmWriter film_actor) {
		this.film_writers = new ArrayList<filmWriter>();
		this.film_writers.add(film_actor);
	}

	public filmWriters(List<filmWriter> film_writer) {
		this.film_writers = new ArrayList<filmWriter>();
		this.film_writers.addAll(film_writer);
	}

	public void addWriter(filmWriter film_writer) {
		this.film_writers.add(film_writer);
	}

	public List<filmWriter> getfilmWriters() {
		return this.film_writers;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		int writerIndex = 1;
		for (filmWriter film_writer : film_writers) {
			sb.append("writer <" + writerIndex++ + ">: \n");
			sb.append(film_writer.toString() + "\n");
		}

		return sb.toString();
	}
}
